# Contributor: August Klein <amatcoder@gmail.com>
# Maintainer: August Klein <amatcoder@gmail.com>
pkgname=sdl2_ttf
pkgver=2.20.0
pkgrel=0
_pkgname=SDL2_ttf
pkgdesc="A library which allows you to use TrueType fonts in your SDL applications"
url="http://www.libsdl.org/projects/SDL_ttf/"
arch="all"
license="Zlib"
depends_dev="freetype-dev"
makedepends="$depends_dev mesa-dev sdl2-dev"
subpackages="$pkgname-dev"
options="!check"  # no test suite
source="https://github.com/libsdl-org/SDL_ttf/releases/download/release-$pkgver/$_pkgname-$pkgver.tar.gz"

builddir="$srcdir"/$_pkgname-$pkgver

# secfixes:
#   2.20.0-r0:
#     - CVE-2022-27470

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
14c78cfa04b938f0bd141d841a9473a1678bb04d01a96391cfa37ae3e7e316c90f175aff7d052499f7d982f59b823813e4cfdd367631a44b08b85f9b60d09c8c  SDL2_ttf-2.20.0.tar.gz
"
